package com.dolphin.common.expr.emus;

import lombok.Getter;

/**
 * @author shida
 */

@Getter
public enum CompsiteEventTypeEnum {

    SINGLE_STEP_M_N(1,"单步M(M>1)选N(N>1)"),
    DEFAULT(0, "");

    private int code;
    private String desc;

    CompsiteEventTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CompsiteEventTypeEnum getByCode(int code) {
        for (CompsiteEventTypeEnum value : CompsiteEventTypeEnum.values()) {
            if (value.getCode() == code) {
                return value;
            }
        }
        return DEFAULT;
    }
}
